<?php //pack11class

class Document {

    public $label="Document";
    public $file="";

    public function setData($data) {
        if(is_null(@$data[LanguagesManager::field()])) {
            foreach(LanguagesManager::getLanguages() as $language) {
                if(array_key_exists($language->systemName, $data)) {
                    if(!is_null($data[$language->systemName])) {
                        $this->file=$data[$language->systemName];
                    }
                }
            }
        } else {
            $this->file=$data[LanguagesManager::field()];
        }

        $this->label=ValuesManager::getValueByID(@$data["label"]);
    }

}

?>
